package com.airnews.ticket.ui;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.airnews.ticket.R;
import com.mobclick.android.MobclickAgent;

public class TelPay extends Activity implements OnClickListener {
	private Button backBut;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.telpay);
		Button btn = (Button) findViewById(R.id.tmakesure);
		btn.setOnClickListener(this);
		
		backBut = (Button)findViewById(R.id.backBut);
		backBut.setOnClickListener(this);
	}

	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.tmakesure:
				Intent intent = new Intent(Intent.ACTION_DIAL, Uri
						.parse("tel:4000555767"));
				startActivity(intent);
				break;
			case R.id.backBut:
				Intent intent3 = new Intent();
    			intent3.setClass(TelPay.this,Main.class);
    			startActivity(intent3);
    			break;
		}
	}
	
	public void onResume() {     
		super.onResume();     
		MobclickAgent.onResume(this); 
	}  
	
	public void onPause() {     
		super.onPause();     
		MobclickAgent.onPause(this); 
	}  
}
